import type { ProductTypeEnum } from '@/const/enum'

export interface PageReqDto {
    pageNum: number
    pageSize: number
}

export interface PageDto<RecordDto> {
    total: number
    totalPage: number
    totalCount: number
    list: RecordDto[]
}

export interface PagesDto<RecordDto> {
    total: number
    rows: RecordDto[]
}

export interface EnumDto {
    label: string
    value: string | number
}

export interface TreeDto extends EnumDto {
    children?: TreeDto[]
}

export interface DictionaryDto {
    dictLabel: string
    dictValue: string | number
    remark?: string
}


export type TagType = 'success' | 'warning' | 'info' | 'primary' | 'danger'

export type ProductType = ProductTypeEnum.DALIY | ProductTypeEnum.ELESIGN | ProductTypeEnum.GROUP | ProductTypeEnum.PAYWAGE | ProductTypeEnum.PERIOD

// antd tree组件必须要有一个key属性
export type AntTreeDto<D> = {
    [key in keyof D]: D[key]
} & {
    key: number
    children?: AntTreeDto<D>[]
}

export type AddType = 'newAdd' | 'add' | 'edit'